<include file="../Public/Header" />
<!----------------------------------------------------------------------------------->
<style>
    .articlesort{ font-size: 12px}
    .articlesort a:hover{ text-decoration: underline}
    .articlesort .order{ width: 60px; text-align: center}
    .articlesort .id{ width: 60px; text-align: center}
    .articlesort .name{ width: 200px}
    .articlesort .status{ text-align: center; width: 100px}
    .articlesort .value .status{ color: #ccc}
    .articlesort .admin{ text-align: center; width: 150px}
</style>
<form method="post" action="{:U('admin/model/order')}">
    <table class="articlesort">
        <tr class="title">
            <td class="order">排序</td>
            <td class="id">模块id</td>
            <td class="name">模块名称</td>
            <td class="status">模块状态</td>
            <td class="admin">模块管理</td>
        </tr>
        <foreach name="models.title" item="vo">
            
                <tr class="value">
                    <td class="order"><input type="text" size="1" name="order[{$vo.model_id}]" value="{$vo.model_order}" /></td>
                    <td class="id">{$vo.model_id}</td>
                    <td class="name"><a href="">|-{$vo.model_name}</a></td>
                    <td class="status"><php>if ($vo[model_status]==1){</php>启用|<a href="admin.php?m={$model}&a=status&sid={$vo.model_id}&status=0">关闭</a><php>}elseif( $vo[model_status]==0){</php><a href="admin.php?m={$model}&a=status&sid={$vo.model_id}&status=1">启用</a>|关闭<php>}</php></td>
                    <td class="admin"><a href="{:U('insert',array('sid'=>$vo['model_id']))}">添加功能</a>|<a href="{:U('update',array('sid'=>$vo['model_id']))}">修改</a>|<a href="{:U('del',array('sid'=>$vo['model_id']))}" onclick="return confirm('是否确认删除')">删除</a></td>
                </tr>
                <php>foreach($models['model'] as $vo1){</php>
                <php>if ($vo[model_id]==$vo1[model_parent_id]){</php>
                        <tr class="value">
                            <td class="order"><input type="text" size="1" name="order[{$vo1.model_id}]" value="{$vo1.model_order}" /></td>
                            <td class="id">{$vo1.model_id}</td>
                            <td class="name"><a href="">&nbsp;&nbsp;&nbsp;&nbsp;|-{$vo1.model_name}</a></td>
                            <td class="status"><php>if ($vo[model_status]==1){</php>启用|<a href="admin.php?m={$model}&a=status&sid={$vo.model_id}&status=0">关闭</a><php>}elseif( $vo[model_status]==0){</php><a href="admin.php?m={$model}&a=status&sid={$vo.model_id}&status=1">启用</a>|关闭<php>}</php></td>
                            <td class="admin"><a href="{:U('update',array('sid'=>$vo1['model_id']))}">修改</a>|<a href="{:U('del',array('sid'=>$vo1['model_id']))}" onclick="return confirm('{$language.admin_del_box}')">删除</a></td>
                        </tr>
                    <php>}</php>
                <php>}</php>
            
        </foreach>
    </table>
    <input type="submit" value="更新" />
</form>
                        
			 
			 
<!-----------------------------------------------------------------------------------> 
<include file="../Public/footer" />